Difference between revisions of "Colors in Matlab"

From biophysics
Jump to navigation Jump to search
Line 27: Line 27:
  
 
{| class="wikitable"  
 
{| class="wikitable"  
! RGB Code || English Name || Nederlandse Naam || Deutsche Name || Nombre en Español || Color
+
! RGB Code || Hex Code || English Name || Nederlandse Naam || Deutsche Name || Nombre en Español || Kleur
 
|-
 
|-
| [0.00, 1.00, 0.00] || Lime || Limoen || Limettengrün || Lima || <span style="background-color:#00FF00; display:inline-block; width:20px; height:20px;"></span>
+
| [0.00, 1.00, 0.00] || #00FF00 || Lime || Limoen || Limettengrün || Lima || <span style="background-color:#00FF00; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [1.00, 0.00, 0.00] || Red || Rood || Rot || Rojo || <span style="background-color:#FF0000; display:inline-block; width:20px; height:20px;"></span>
+
| [1.00, 0.00, 0.00] || #FF0000 || Red || Rood || Rot || Rojo || <span style="background-color:#FF0000; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.00, 0.00, 1.00] || Blue || Blauw || Blau || Azul || <span style="background-color:#0000FF; display:inline-block; width:20px; height:20px;"></span>
+
| [0.00, 0.00, 1.00] || #0000FF || Blue || Blauw || Blau || Azul || <span style="background-color:#0000FF; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.00, 1.00, 1.00] || Cyan || Cyaan || Cyan || Cian || <span style="background-color:#00FFFF; display:inline-block; width:20px; height:20px;"></span>
+
| [0.00, 1.00, 1.00] || #00FFFF || Cyan || Cyaan || Cyan || Cian || <span style="background-color:#00FFFF; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [1.00, 0.00, 1.00] || Magenta || Magenta || Magenta || Magenta || <span style="background-color:#FF00FF; display:inline-block; width:20px; height:20px;"></span>
+
| [1.00, 0.00, 1.00] || #FF00FF || Magenta || Magenta || Magenta || Magenta || <span style="background-color:#FF00FF; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [1.00, 1.00, 0.00] || Yellow || Geel || Gelb || Amarillo || <span style="background-color:#FFFF00; display:inline-block; width:20px; height:20px;"></span>
+
| [1.00, 1.00, 0.00] || #FFFF00 || Yellow || Geel || Gelb || Amarillo || <span style="background-color:#FFFF00; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.00, 0.00, 0.00] || Black || Zwart || Schwarz || Negro || <span style="background-color:#000000; display:inline-block; width:20px; height:20px;"></span>
+
| [0.00, 0.00, 0.00] || #000000 || Black || Zwart || Schwarz || Negro || <span style="background-color:#000000; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.50, 0.50, 0.50] || Grey || Grijs || Grau || Gris || <span style="background-color:#808080; display:inline-block; width:20px; height:20px;"></span>
+
| [0.50, 0.50, 0.50] || #808080 || Grey || Grijs || Grau || Gris || <span style="background-color:#808080; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [1.00, 1.00, 1.00] || White || Wit || Weiß || Blanco || <span style="background-color:#FFFFFF; display:inline-block; width:20px; height:20px;"></span>
+
| [1.00, 1.00, 1.00] || #FFFFFF || White || Wit || Weiß || Blanco || <span style="background-color:#FFFFFF; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.50, 0.00, 0.00] || Maroon || Kastanjebruin || Kastanienbraun || Granate || <span style="background-color:#800000; display:inline-block; width:20px; height:20px;"></span>
+
| [0.50, 0.00, 0.00] || #800000 || Maroon || Kastanjebruin || Kastanienbraun || Granate || <span style="background-color:#800000; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.00, 0.50, 0.00] || Green || Groen || Grün || Verde || <span style="background-color:#008000; display:inline-block; width:20px; height:20px;"></span>
+
| [0.00, 0.50, 0.00] || #008000 || Green || Groen || Grün || Verde || <span style="background-color:#008000; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.00, 0.00, 0.50] || Navy Blue || Marineblauw || Marineblau || Azul Marino || <span style="background-color:#000080; display:inline-block; width:20px; height:20px;"></span>
+
| [0.00, 0.00, 0.50] || #000080 || Navy Blue || Marineblauw || Marineblau || Azul Marino || <span style="background-color:#000080; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.00, 0.50, 0.50] || Olive || Olijf || Olive || Oliva || <span style="background-color:#008080; display:inline-block; width:20px; height:20px;"></span>
+
| [0.00, 0.50, 0.50] || #008080 || Olive || Olijf || Olive || Oliva || <span style="background-color:#008080; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.50, 0.00, 0.50] || Purple || Paars || Lila || MORADO || <span style="background-color:#800080; display:inline-block; width:20px; height:20px;"></span>
+
| [0.50, 0.00, 0.50] || #800080 || Purple || Paars || Lila || MORADO || <span style="background-color:#800080; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.50, 0.50, 0.00] || Teal || Zeegroen || Türkis || Verde azulado || <span style="background-color:#808000; display:inline-block; width:20px; height:20px;"></span>
+
| [0.50, 0.50, 0.00] || #808000 || Teal || Zeegroen || Türkis || Verde azulado || <span style="background-color:#808000; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.50, 0.00, 1.00] || Indigo || Indigo || Indigo || Índigo || <span style="background-color:#8000FF; display:inline-block; width:20px; height:20px;"></span>
+
| [0.50, 0.00, 1.00] || #8000FF || Indigo || Indigo || Indigo || Índigo || <span style="background-color:#8000FF; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.50, 1.00, 0.00] || Chartreuse || Chartreuse || Chartreuse || Chartreuse || <span style="background-color:#80FF00; display:inline-block; width:20px; height:20px;"></span>
+
| [0.50, 1.00, 0.00] || #80FF00 || Chartreuse || Chartreuse || Chartreuse || Chartreuse || <span style="background-color:#80FF00; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.00, 0.50, 1.00] || Royal Blue || Koningsblauw || Königsblau || Azul Real || <span style="background-color:#0080FF; display:inline-block; width:20px; height:20px;"></span>
+
| [0.00, 0.50, 1.00] || #0080FF || Royal Blue || Koningsblauw || Königsblau || Azul Real || <span style="background-color:#0080FF; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [1.00, 0.00, 0.50] || Hot Pink || Felroze || Knallrosa || Rosa BRILLIANTE || <span style="background-color:#FF0080; display:inline-block; width:20px; height:20px;"></span>
+
| [1.00, 0.00, 0.50] || #FF0080 || Hot Pink || Felroze || Knallrosa || Rosa BRILLIANTE || <span style="background-color:#FF0080; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [1.00, 0.50, 0.00] || Orange || Oranje || Orange || Naranja || <span style="background-color:#FF8000; display:inline-block; width:20px; height:20px;"></span>
+
| [1.00, 0.50, 0.00] || #FF8000 || Orange || Oranje || Orange || Naranja || <span style="background-color:#FF8000; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.00, 1.00, 0.50] || Spring Green || Lentegroen || Frühlingsgrün || Verde Primavera || <span style="background-color:#00FF80; display:inline-block; width:20px; height:20px;"></span>
+
| [0.00, 1.00, 0.50] || #00FF80 || Spring Green || Lentegroen || Frühlingsgrün || Verde Primavera || <span style="background-color:#00FF80; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.50, 0.50, 1.00] || Light Blue || Lichtblauw || Hellblau || Azul Claro || <span style="background-color:#8080FF; display:inline-block; width:20px; height:20px;"></span>
+
| [0.50, 0.50, 1.00] || #8080FF || Light Blue || Lichtblauw || Hellblau || Azul Claro || <span style="background-color:#8080FF; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.50, 1.00, 0.50] || Light Green || Lichtgroen || Hellgrün || Verde Claro || <span style="background-color:#80FF80; display:inline-block; width:20px; height:20px;"></span>
+
| [0.50, 1.00, 0.50] || #80FF80 || Light Green || Lichtgroen || Hellgrün || Verde Claro || <span style="background-color:#80FF80; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [1.00, 0.50, 0.50] || Salmon || Zalmroze || Lachs || Salmón || <span style="background-color:#FF8080; display:inline-block; width:20px; height:20px;"></span>
+
| [0.50, 1.00, 1.00] || #80FFFF || Aquamarine || Aquamarijn || Aquamarin || Aguamarina || <span style="background-color:#80FFFF; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [0.50, 1.00, 1.00] || Aquamarine || Aquamarijn || Aquamarin || Aguamarina || <span style="background-color:#80FFFF; display:inline-block; width:20px; height:20px;"></span>
+
| [1.00, 0.50, 0.50] || #FF8080 || Salmon || Zalmroze || Lachs || Salmón || <span style="background-color:#FF8080; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [1.00, 0.50, 1.00] || Orchid || Orchidee || Orchidee || Orquídea || <span style="background-color:#FF80FF; display:inline-block; width:20px; height:20px;"></span>
+
| [1.00, 0.50, 1.00] || #FF80FF || Orchid || Orchidee || Orchidee || Orquídea || <span style="background-color:#FF80FF; display:inline-block; width:20px; height:20px;"></span>
 
|-
 
|-
| [1.00, 1.00, 0.50] || Light Yellow || Lichtgeel || Hellgelb || Amarillo Claro || <span style="background-color:#FFFF80; display:inline-block; width:20px; height:20px;"></span>
+
| [1.00, 1.00, 0.50] || #FFFF80 || Light Yellow || Lichtgeel || Hellgelb || Amarillo Claro || <span style="background-color:#FFFF80; display:inline-block; width:20px; height:20px;"></span>
 
|}
 
|}

Revision as of 11:29, 23 September 2024

RGB colors

For coding purposes colors are mostly specified in RGB, which stands for Red, Blue and Green. The values range from 0 to 1. As an example: the color red is given by the triple [1,0,0]. Since it is hard to know what a certain triple (e.g. [0.5, 1, 0.5]) stands for it is more easy to call them by their name.

We have created a few functions for RGB colors by their names:

  • <RGBcolors> for english names
  • <RGBkleuren> for dutch names
  • <RGBfarben> for german names
  • <RGBcolores> for spanish names

A few examples:

>>colores.AZUL_CLARO
ans = 0.5000   0.5000   1.0000

>>kleuren.FELROZE
ans = 0.5000   0.5000   1.0000

>>farben.BLAU
ans = 0.0000   0.0000   1.0000

>>colors.LIME
ans = 0.0000   1.0000   0.0000

All the named colors are:

RGB Code Hex Code English Name Nederlandse Naam Deutsche Name Nombre en Español Kleur
[0.00, 1.00, 0.00] #00FF00 Lime Limoen Limettengrün Lima
[1.00, 0.00, 0.00] #FF0000 Red Rood Rot Rojo
[0.00, 0.00, 1.00] #0000FF Blue Blauw Blau Azul
[0.00, 1.00, 1.00] #00FFFF Cyan Cyaan Cyan Cian
[1.00, 0.00, 1.00] #FF00FF Magenta Magenta Magenta Magenta
[1.00, 1.00, 0.00] #FFFF00 Yellow Geel Gelb Amarillo
[0.00, 0.00, 0.00] #000000 Black Zwart Schwarz Negro
[0.50, 0.50, 0.50] #808080 Grey Grijs Grau Gris
[1.00, 1.00, 1.00] #FFFFFF White Wit Weiß Blanco
[0.50, 0.00, 0.00] #800000 Maroon Kastanjebruin Kastanienbraun Granate
[0.00, 0.50, 0.00] #008000 Green Groen Grün Verde
[0.00, 0.00, 0.50] #000080 Navy Blue Marineblauw Marineblau Azul Marino
[0.00, 0.50, 0.50] #008080 Olive Olijf Olive Oliva
[0.50, 0.00, 0.50] #800080 Purple Paars Lila MORADO
[0.50, 0.50, 0.00] #808000 Teal Zeegroen Türkis Verde azulado
[0.50, 0.00, 1.00] #8000FF Indigo Indigo Indigo Índigo
[0.50, 1.00, 0.00] #80FF00 Chartreuse Chartreuse Chartreuse Chartreuse
[0.00, 0.50, 1.00] #0080FF Royal Blue Koningsblauw Königsblau Azul Real
[1.00, 0.00, 0.50] #FF0080 Hot Pink Felroze Knallrosa Rosa BRILLIANTE
[1.00, 0.50, 0.00] #FF8000 Orange Oranje Orange Naranja
[0.00, 1.00, 0.50] #00FF80 Spring Green Lentegroen Frühlingsgrün Verde Primavera
[0.50, 0.50, 1.00] #8080FF Light Blue Lichtblauw Hellblau Azul Claro
[0.50, 1.00, 0.50] #80FF80 Light Green Lichtgroen Hellgrün Verde Claro
[0.50, 1.00, 1.00] #80FFFF Aquamarine Aquamarijn Aquamarin Aguamarina
[1.00, 0.50, 0.50] #FF8080 Salmon Zalmroze Lachs Salmón
[1.00, 0.50, 1.00] #FF80FF Orchid Orchidee Orchidee Orquídea
[1.00, 1.00, 0.50] #FFFF80 Light Yellow Lichtgeel Hellgelb Amarillo Claro