This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Jummit's profile picture

Just the RGB values of the CC colors

Started by Jummit, 05 October 2017 - 06:42 AM
Jummit #1
Posted 05 October 2017 - 08:42 AM
I saw myself wanting a table with the RGB values of the computercraft color palette, and since there is no documentation in the color api, i made one myself:
Spoiler

rgbvalues = {
  white = {
	r=240,
	g=240,
	b=240
  },
  orange = {
	r=242,
	g=178,
	b=51
  },
  magenta = {
	r=229,
	g=127,
	b=216
  },
  lightBlue = {
	r=153,
	g=178,
	b=242
  },
  yellow = {
	r=222,
	g=222,
	b=108
  },
  lime = {
	r=127,
	g=204,
	b=25
  },
  pink = {
	r=242,
	g=178,
	b=204
  },
  gray = {
	r=76,
	g=76,
	b=76
  },
  lightGray = {
	r=153,
	g=153,
	b=153
  },
  cyan = {
	r=76,
	g=153,
	b=178
  },
  purple = {
	r=178,
	g=102,
	b=229
  },
  blue = {
	r=51,
	g=102,
	b=204
  },
  brown = {
	r=127,
	g=102,
	b=76
  },
  green = {
	r=87,
	g=166,
	b=78
  },
  red = {
	r=204,
	g=76,
	b=76
  },
  black = {
	r=25,
	g=25,
	b=25
  },
}
Use this how you want, you don't have to give me credit.
Edited on 05 October 2017 - 06:42 AM
Anavrins #2
Posted 05 October 2017 - 11:58 AM
http://www.computerc...iki/Colors_(API)
There's the RGB values documented at the bottom of that page.
Edited on 05 October 2017 - 10:01 AM
Jummit #3
Posted 05 October 2017 - 12:19 PM
http://www.computerc...iki/Colors_(API)
There's the RGB values documented at the bottom of that page.
You mean this?

#F0F0F0
I used this to convert it to the values
I needed them in this format:
{r=0,g=0,b=0}
Anavrins #4
Posted 05 October 2017 - 08:37 PM
{r=0xF0, g=0xF0, b=0xF0} would work just as well.
Edited on 05 October 2017 - 06:37 PM