Add controlled list of colors for categorizing images
This commit is contained in:
parent
77ae0327c1
commit
55ad6530dd
52
src/MDColorsSet.php
Normal file
52
src/MDColorsSet.php
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
<?PHP
|
||||||
|
/**
|
||||||
|
* Contains a class for controlling the list of base colors.
|
||||||
|
*
|
||||||
|
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||||
|
*/
|
||||||
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class containing available colors.
|
||||||
|
*/
|
||||||
|
final class MDColorsSet extends MDValueSet {
|
||||||
|
|
||||||
|
const COLOR_NAMES = [
|
||||||
|
"black",
|
||||||
|
"green",
|
||||||
|
"silver",
|
||||||
|
"lime",
|
||||||
|
"gray",
|
||||||
|
"olive",
|
||||||
|
"white",
|
||||||
|
"yellow",
|
||||||
|
"maroon",
|
||||||
|
"navy",
|
||||||
|
"red",
|
||||||
|
"blue",
|
||||||
|
"purple",
|
||||||
|
"teal",
|
||||||
|
"fuchsia",
|
||||||
|
"aqua",
|
||||||
|
];
|
||||||
|
|
||||||
|
const COLORS_RGB = [
|
||||||
|
"black" => [0, 0, 0],
|
||||||
|
"green" => [0, 128, 0],
|
||||||
|
"silver" => [192, 192, 192],
|
||||||
|
"lime" => [0, 255, 0],
|
||||||
|
"gray" => [128, 0, 128],
|
||||||
|
"olive" => [128, 128, 0],
|
||||||
|
"white" => [255, 255, 255],
|
||||||
|
"yellow" => [255, 255, 0],
|
||||||
|
"maroon" => [128, 0, 0],
|
||||||
|
"navy" => [0, 0, 128],
|
||||||
|
"red" => [255, 0, 0],
|
||||||
|
"blue" => [0, 0, 255],
|
||||||
|
"purple" => [128, 0, 128],
|
||||||
|
"teal" => [0, 128, 128],
|
||||||
|
"fuchsia" => [255, 0, 255],
|
||||||
|
"aqua" => [0, 255, 255],
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user