If you train your YOLO model only on grayscale images to detect car, then would it able to recognise a car in a colored image also. If so, then can I assume that YOLO consider only object shape not color? Kindly clarify.
YOLO has 3 input channels (RGB typically) and is a CNN, a neural net that uses stacked (trainable) convolution filters. Single convolution filters act as feature detectors and can be (trained to be) sensitive for straight edges from dark to light or a gradual passage from green to red. By stacking those you can build filters for more complicated features (such as faces).
TL;DR The network can learn to differentiate green and red circles if you want to.