Commit db09deed authored by Lorenzo Marcantonio's avatar Lorenzo Marcantonio

New color palette

parent 90f2e67e
......@@ -76,30 +76,36 @@ bool IsGOST()
*/
const StructColors g_ColorRefs[NBCOLORS] =
{
{ 0, 0, 0, BLACK, wxT( "BLACK" ), DARKDARKGRAY },
{ 192, 0, 0, BLUE, wxT( "BLUE" ), LIGHTBLUE },
{ 0, 160, 0, GREEN, wxT( "GREEN" ), LIGHTGREEN },
{ 160, 160, 0, CYAN, wxT( "CYAN" ), LIGHTCYAN },
{ 0, 0, 160, RED, wxT( "RED" ), LIGHTRED },
{ 160, 0, 160, MAGENTA, wxT( "MAGENTA" ), LIGHTMAGENTA },
{ 0, 128, 128, BROWN, wxT( "BROWN" ), YELLOW },
{ 192, 192, 192, LIGHTGRAY, wxT( "GRAY" ), WHITE },
{ 128, 128, 128, DARKGRAY, wxT( "DARKGRAY" ), LIGHTGRAY },
{ 255, 0, 0, LIGHTBLUE, wxT( "LIGHTBLUE" ), LIGHTBLUE },
{ 0, 255, 0, LIGHTGREEN, wxT( "LIGHTGREEN" ), LIGHTGREEN },
{ 255, 255, 0, LIGHTCYAN, wxT( "LIGHTCYAN" ), LIGHTCYAN },
{ 0, 0, 255, LIGHTRED, wxT( "LIGHTRED" ), LIGHTRED },
{ 255, 0, 255, LIGHTMAGENTA, wxT( "LIGHTMAGENTA" ), LIGHTMAGENTA },
{ 0, 255, 255, YELLOW, wxT( "YELLOW" ), YELLOW },
{ 255, 255, 255, WHITE, wxT( "WHITE" ), WHITE },
{ 64, 64, 64, DARKDARKGRAY, wxT( "DARKDARKGRAY" ), DARKGRAY },
{ 64, 0, 0, DARKBLUE, wxT( "DARKBLUE" ), BLUE },
{ 0, 64, 0, DARKGREEN, wxT( "DARKGREEN" ), GREEN },
{ 64, 64, 0, DARKCYAN, wxT( "DARKCYAN" ), CYAN },
{ 0, 0, 80, DARKRED, wxT( "DARKRED" ), RED },
{ 64, 0, 64, DARKMAGENTA, wxT( "DARKMAGENTA" ), MAGENTA },
{ 0, 64, 64, DARKBROWN, wxT( "DARKBROWN" ), BROWN },
{ 128, 255, 255, LIGHTYELLOW, wxT( "LIGHTYELLOW" ), LIGHTYELLOW }
{ 0, 0, 0, BLACK, wxT( "Black" ), DARKDARKGRAY },
{ 72, 72, 72, DARKDARKGRAY, wxT( "Gray 1" ), DARKGRAY },
{ 132, 132, 132, DARKGRAY, wxT( "Gray 2" ), LIGHTGRAY },
{ 194, 194, 194, LIGHTGRAY, wxT( "Gray 3" ), WHITE },
{ 255, 255, 255, WHITE, wxT( "White" ), WHITE },
{ 194, 255, 255, LIGHTYELLOW, wxT( "L.Yellow" ), WHITE },
{ 72, 0, 0, DARKBLUE, wxT( "Blue 1" ), BLUE },
{ 0, 72, 0, DARKGREEN, wxT( "Green 1" ), GREEN },
{ 72, 72, 0, DARKCYAN, wxT( "Cyan 1" ), CYAN },
{ 0, 0, 72, DARKRED, wxT( "Red 1" ), RED },
{ 72, 0, 72, DARKMAGENTA, wxT( "Magenta 1" ), MAGENTA },
{ 0, 72, 72, DARKBROWN, wxT( "Brown 1" ), BROWN },
{ 132, 0, 0, BLUE, wxT( "Blue 2" ), LIGHTBLUE },
{ 0, 132, 0, GREEN, wxT( "Green 2" ), LIGHTGREEN },
{ 132, 132, 0, CYAN, wxT( "Cyan 2" ), LIGHTCYAN },
{ 0, 0, 132, RED, wxT( "Red 2" ), LIGHTRED },
{ 132, 0, 132, MAGENTA, wxT( "Magenta 2" ), LIGHTMAGENTA },
{ 0, 132, 132, BROWN, wxT( "Brown 2" ), YELLOW },
{ 194, 0, 0, LIGHTBLUE, wxT( "Blue 3" ), PUREBLUE, },
{ 0, 194, 0, LIGHTGREEN, wxT( "Green 3" ), PUREGREEN },
{ 194, 194, 0, LIGHTCYAN, wxT( "Cyan 3" ), PURECYAN },
{ 0, 0, 194, LIGHTRED, wxT( "Red 3" ), PURERED },
{ 194, 0, 194, LIGHTMAGENTA, wxT( "Magenta 3" ), PUREMAGENTA },
{ 0, 194, 194, YELLOW, wxT( "Yellow 3" ), PUREYELLOW },
{ 255, 0, 0, PUREBLUE, wxT( "Blue 4" ), WHITE },
{ 0, 255, 0, PUREGREEN, wxT( "Green 4" ), WHITE },
{ 255, 255, 0, PURECYAN, wxT( "Cyan 4" ), WHITE },
{ 0, 0, 255, PURERED, wxT( "Red 4" ), WHITE },
{ 255, 0, 255, PUREMAGENTA, wxT( "Magenta 4" ), WHITE },
{ 0, 255, 255, PUREYELLOW, wxT( "Yellow 4" ), WHITE },
};
......
......@@ -171,30 +171,36 @@ bool DXF_PLOTTER::StartPlot()
const char *name;
int color;
} dxf_layer[NBCOLORS] = {
{ "BLACK", 250 },
{ "BLUE", 5 },
{ "GREEN", 3 },
{ "CYAN", 4 },
{ "RED", 1 },
{ "MAGENTA", 6 },
{ "BROWN", 54 },
{ "LIGHTGRAY", 9 },
{ "DARKGRAY", 8 },
{ "LIGHTBLUE", 171 },
{ "LIGHTGREEN", 91 },
{ "LIGHTCYAN", 131 },
{ "LIGHTRED", 11 },
{ "LIGHTMAGENTA", 221 },
{ "YELLOW", 2 },
{ "BLACK", 7 }, // In DXF, color 7 is *both* white and black!
{ "GRAY1", 251 },
{ "GRAY2", 8 },
{ "GRAY3", 9 },
{ "WHITE", 7 },
{ "DARKDARKGRAY", 251 },
{ "DARKBLUE", 178 },
{ "DARKGREEN", 98 },
{ "DARKCYAN", 138 },
{ "DARKRED", 18 },
{ "DARKMAGENTA", 228 },
{ "DARKBROWN", 58 },
{ "LIGHTYELLOW", 51 },
{ "LYELLOW", 51 },
{ "BLUE1", 178 },
{ "GREEN1", 98 },
{ "CYAN1", 138 },
{ "RED1", 18 },
{ "MAGENTA1", 228 },
{ "BROWN1", 58 },
{ "BLUE2", 5 },
{ "GREEN2", 3 },
{ "CYAN2", 4 },
{ "RED2", 1 },
{ "MAGENTA2", 6 },
{ "BROWN2", 54 },
{ "BLUE3", 171 },
{ "GREEN3", 91 },
{ "CYAN3", 131 },
{ "RED3", 11 },
{ "MAGENTA3", 221 },
{ "YELLOW3", 2 },
{ "BLUE4", 5 },
{ "GREEN4", 3 },
{ "CYAN4", 4 },
{ "RED4", 1 },
{ "MAGENTA4", 6 },
{ "YELLOW4", 2 }
};
for( EDA_COLOR_T i = BLACK; i < NBCOLORS; ++i )
......
......@@ -139,15 +139,15 @@ void WinEDA_SelColorFrame::Init_Dialog( int aOldColor )
for( ii = 0; ii < NBCOLORS; ++ii )
{
// Provide a separate column for every eight buttons (and their
// Provide a separate column for every six buttons (and their
// associated text strings), so provide a FlexGrid Sizer with
// eight rows and two columns.
if( ii % 8 == 0 )
if( ii % 6 == 0 )
{
FlexColumnBoxSizer = new wxFlexGridSizer( 8, 2, 0, 0 );
FlexColumnBoxSizer = new wxFlexGridSizer( 6, 2, 0, 0 );
// Specify that all of the rows can be expanded.
for( int ii = 0; ii < 8; ii++ )
for( int ii = 0; ii < 6; ii++ )
{
FlexColumnBoxSizer->AddGrowableRow( ii );
}
......
......@@ -14,32 +14,38 @@ enum EDA_COLOR_T
{
UNSPECIFIED_COLOR = -1,
BLACK = 0,
DARKDARKGRAY,
DARKGRAY,
LIGHTGRAY,
WHITE,
LIGHTYELLOW,
DARKBLUE,
DARKGREEN,
DARKCYAN,
DARKRED,
DARKMAGENTA,
DARKBROWN,
BLUE,
GREEN,
CYAN,
RED,
MAGENTA,
BROWN,
LIGHTGRAY,
DARKGRAY,
LIGHTBLUE,
LIGHTGREEN,
LIGHTCYAN,
LIGHTRED,
LIGHTMAGENTA,
YELLOW,
WHITE,
DARKDARKGRAY,
DARKBLUE,
DARKGREEN,
DARKCYAN,
DARKRED,
DARKMAGENTA,
DARKBROWN,
LIGHTYELLOW,
PUREBLUE,
PUREGREEN,
PURECYAN,
PURERED,
PUREMAGENTA,
PUREYELLOW,
NBCOLORS, ///< Number of colors
HIGHLIGHT_FLAG = ( 1<<19 ),
MASKCOLOR = 31 ///< mask for color index into ColorRefs[]
MASKCOLOR = 31 ///< mask for color index into g_ColorRefs[]
};
/// Checked cast. Use only when necessary (usually I/O)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment