Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

colors.m 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. function y=colors(x)
  2. % rgb=colors(name)
  3. % Returns the RGB value of a named color.
  4. % http://www.rapidtables.com/web/color/RGB_Color.htm
  5. % if called with no inputs returns a list of valid color names.
  6. % Feel free to add additional colors
  7. O={'maroon', [128,0,0]/255;
  8. 'dark red', [139,0,0]/255;
  9. 'brown', [165,42,42]/255;
  10. 'firebrick', [178,34,34]/255;
  11. 'crimson', [220,20,60]/255;
  12. 'red', [255,0,0]/255;
  13. 'tomato', [255,99,71]/255;
  14. 'coral', [255,127,80]/255;
  15. 'indian red', [205,92,92]/255;
  16. 'light coral', [240,128,128]/255;
  17. 'dark salmon', [233,150,122]/255;
  18. 'salmon', [250,128,114]/255;
  19. 'light salmon', [255,160,122]/255;
  20. 'orange red', [255,69,0]/255;
  21. 'dark orange', [255,140,0]/255;
  22. 'orange', [255,165,0]/255;
  23. 'gold', [255,215,0]/255;
  24. 'dark golden rod', [184,134,11]/255;
  25. 'golden rod', [218,165,32]/255;
  26. 'pale golden rod', [238,232,170]/255;
  27. 'dark khaki', [189,183,107]/255;
  28. 'khaki', [240,230,140]/255;
  29. 'olive', [128,128,0]/255;
  30. 'yellow', [255,255,0]/255;
  31. 'yellow green', [154,205,50]/255;
  32. 'dark olive green', [85,107,47]/255;
  33. 'olive drab', [107,142,35]/255;
  34. 'lawn green', [124,252,0]/255;
  35. 'chart reuse', [127,255,0]/255;
  36. 'green yellow', [173,255,47]/255;
  37. 'dark green', [0,100,0]/255;
  38. 'green', [0,128,0]/255;
  39. 'forest green', [34,139,34]/255;
  40. 'lime', [0,255,0]/255;
  41. 'lime green', [50,205,50]/255;
  42. 'light green', [144,238,144]/255;
  43. 'pale green', [152,251,152]/255;
  44. 'dark sea green', [143,188,143]/255;
  45. 'medium spring green', [0,250,154]/255;
  46. 'spring green', [0,255,127]/255;
  47. 'sea green', [46,139,87]/255;
  48. 'medium aqua marine', [102,205,170]/255;
  49. 'medium sea green', [60,179,113]/255;
  50. 'light sea green', [32,178,170]/255;
  51. 'dark slate gray', [47,79,79]/255;
  52. 'teal', [0,128,128]/255;
  53. 'dark cyan', [0,139,139]/255;
  54. 'aqua', [0,255,255]/255;
  55. 'cyan', [0,255,255]/255;
  56. 'light cyan', [224,255,255]/255;
  57. 'dark turquoise', [0,206,209]/255;
  58. 'turquoise', [64,224,208]/255;
  59. 'medium turquoise', [72,209,204]/255;
  60. 'pale turquoise', [175,238,238]/255;
  61. 'aqua marine', [127,255,212]/255;
  62. 'powder blue', [176,224,230]/255;
  63. 'cadet blue', [95,158,160]/255;
  64. 'steel blue', [70,130,180]/255;
  65. 'corn flower blue', [100,149,237]/255;
  66. 'deep sky blue', [0,191,255]/255;
  67. 'dodger blue', [30,144,255]/255;
  68. 'light blue', [173,216,230]/255;
  69. 'sky blue', [135,206,235]/255;
  70. 'light sky blue', [135,206,250]/255;
  71. 'midnight blue', [25,25,112]/255;
  72. 'navy', [0,0,128]/255;
  73. 'dark blue', [0,0,139]/255;
  74. 'medium blue', [0,0,205]/255;
  75. 'blue', [0,0,255]/255;
  76. 'royal blue', [65,105,225]/255;
  77. 'blue violet', [138,43,226]/255;
  78. 'indigo', [75,0,130]/255;
  79. 'dark slate blue', [72,61,139]/255;
  80. 'slate blue', [106,90,205]/255;
  81. 'medium slate blue', [123,104,238]/255;
  82. 'medium purple', [147,112,219]/255;
  83. 'dark magenta', [139,0,139]/255;
  84. 'dark violet', [148,0,211]/255;
  85. 'dark orchid', [153,50,204]/255;
  86. 'medium orchid', [186,85,211]/255;
  87. 'purple', [128,0,128]/255;
  88. 'thistle', [216,191,216]/255;
  89. 'plum', [221,160,221]/255;
  90. 'violet', [238,130,238]/255;
  91. 'magenta', [255,0,255]/255;
  92. 'orchid', [218,112,214]/255;
  93. 'medium violet red', [199,21,133]/255;
  94. 'pale violet red', [219,112,147]/255;
  95. 'deep pink', [255,20,147]/255;
  96. 'hot pink', [255,105,180]/255;
  97. 'light pink', [255,182,193]/255;
  98. 'pink', [255,192,203]/255;
  99. 'antique white', [250,235,215]/255;
  100. 'beige', [245,245,220]/255;
  101. 'bisque', [255,228,196]/255;
  102. 'blanched almond', [255,235,205]/255;
  103. 'wheat', [245,222,179]/255;
  104. 'corn silk', [255,248,220]/255;
  105. 'lemon chiffon', [255,250,205]/255;
  106. 'light golden rod yellow', [250,250,210]/255;
  107. 'light yellow', [255,255,224]/255;
  108. 'saddle brown', [139,69,19]/255;
  109. 'sienna', [160,82,45]/255;
  110. 'chocolate', [210,105,30]/255;
  111. 'peru', [205,133,63]/255;
  112. 'sandy brown', [244,164,96]/255;
  113. 'burly wood', [222,184,135]/255;
  114. 'tan', [210,180,140]/255;
  115. 'rosy brown', [188,143,143]/255;
  116. 'moccasin', [255,228,181]/255;
  117. 'navajo white', [255,222,173]/255;
  118. 'peach puff', [255,218,185]/255;
  119. 'misty rose', [255,228,225]/255;
  120. 'lavender blush', [255,240,245]/255;
  121. 'linen', [250,240,230]/255;
  122. 'old lace', [253,245,230]/255;
  123. 'papaya whip', [255,239,213]/255;
  124. 'sea shell', [255,245,238]/255;
  125. 'mint cream', [245,255,250]/255;
  126. 'slate gray', [112,128,144]/255;
  127. 'light slate gray', [119,136,153]/255;
  128. 'light steel blue', [176,196,222]/255;
  129. 'lavender', [230,230,250]/255;
  130. 'floral white', [255,250,240]/255;
  131. 'alice blue', [240,248,255]/255;
  132. 'ghost white', [248,248,255]/255;
  133. 'honeydew', [240,255,240]/255;
  134. 'ivory', [255,255,240]/255;
  135. 'azure', [240,255,255]/255;
  136. 'snow', [255,250,250]/255;
  137. 'black', [0,0,0]/255;
  138. 'dim gray', [105,105,105]/255;
  139. 'gray', [128,128,128]/255;
  140. 'dark gray', [169,169,169]/255;
  141. 'silver', [192,192,192]/255;
  142. 'light gray', [211,211,211]/255;
  143. 'gainsboro', [220,220,220]/255;
  144. 'white smoke', [245,245,245]/255;
  145. 'white', [255,255,255]/255;};
  146. if nargin==0
  147. y=O(:,1);
  148. else
  149. cind=strcmp(O(:,1),x);
  150. if all(cind==0)
  151. y=[0 0 0];
  152. fprintf(2,'Do not know color "%s"\n',x)
  153. else
  154. y=O{strcmp(O(:,1),x),2};
  155. end
  156. end