Created
September 12, 2018 05:13
-
-
Save stevenhao/3827a263765194a0798ca0cbdf5cdfa1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* four wheeler, orange (255, 158, 0) | |
* two wheeler, red (255, 61, 99) | |
* pedestrian, blue (0, 0, 230) | |
* barrier, yellow (218, 232, 30) | |
* cone/other, purple (153, 0, 153) | |
*/ | |
const NUSCENES_ORANGE = 'rgb(255, 158, 0)' | |
const NUSCENES_RED = 'rgb(255, 61, 99)' | |
const NUSCENES_BLUE = 'rgb(0, 0, 230)' | |
const NUSCENES_YELLOW = 'rgb(218, 232, 30)' | |
const NUSCENES_PURPLE = 'rgb(153, 0, 153)' | |
const NUSCENES_COLORS = { | |
"car_or_van_or_suv": NUSCENES_ORANGE, | |
"truck": NUSCENES_ORANGE, | |
"pickup_truck": NUSCENES_ORANGE, | |
// "front_of_semi_truck", | |
// "bendy_bus", | |
// "rigid_bus", | |
"construction_vehicle": NUSCENES_ORANGE, | |
"motorcycle": NUSCENES_RED, | |
"bicycle": NUSCENES_RED, | |
// "bicycle_rack", | |
"trailer": NUSCENES_ORANGE, | |
"police_vehicle": NUSCENES_ORANGE, | |
"firetruck": NUSCENES_ORANGE, | |
"ambulance": NUSCENES_ORANGE, | |
// "train", | |
"adult_pedestrian": NUSCENES_BLUE, | |
"child_pedestrian": NUSCENES_BLUE, | |
"construction_worker": NUSCENES_BLUE, | |
// "stroller", | |
// "wheelchair", | |
"portable_personal_mobility_vehicle": NUSCENES_RED, | |
"traffic_police": NUSCENES_BLUE, | |
"other_police": NUSCENES_BLUE, | |
// "small_animal", | |
// "large_animal", | |
// "vehicle_traffic_light_box", | |
// "bike_pedestrian_traffic_light_box", | |
"traffic_cone": NUSCENES_YELLOW, | |
"temporary_traffic_barrier": NUSCENES_YELLOW, | |
"pushable_pullable_object": NUSCENES_PURPLE, | |
"movable_obstacle_in_road": NUSCENES_YELLOW, | |
} | |
export default (label) => { | |
return NUSCENES_COLORS[label] || 'white' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment