Skip to main content

plotting - Determining the RGB values of the default plot color


In Mathematica 7, the default plot color is a purple-like color (although I think it is not Purple). Is it possible to use Mathematica to determine the RGB color values of the default plot color? Thanks for your time.



Answer



All the default colors can be found in ColorData[1]. To obtain the RGB value of the first color you just need to type:


ColorData[1, 1]
(* RGBColor[0.2472, 0.24, 0.6] *)


To check all subsequent colors just change the n in ColorData[1, n]. To obtain the values on the scale 0 to 255:


Round[Rescale[Table[ColorData[1, 1][[i]], {i, 3}], {0, 1}, {0, 255}]]
(* {63, 61, 153} *)

Comments