gfxtools/Color/src/SchemeOrange.cpp
changeset 0 f58d6ec98e88
equal deleted inserted replaced
-1:000000000000 0:f58d6ec98e88
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *       
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include "ColorImp.h"
       
    21 
       
    22 const TRgb KSchemeOrange[30] =
       
    23 	{
       
    24     0x00EECCFF,     // 226
       
    25     0x0099BBFF,
       
    26     0x0088AAFF,
       
    27     0x0077AAFF,
       
    28     0x0055AAFF,
       
    29     0x0044AAFF,
       
    30     0x0033AAFF,
       
    31     0x0011AAFF,
       
    32     0x0000AAFF,
       
    33     0x002299FF,
       
    34     0x001166FF,
       
    35     0x000066EE,
       
    36     0x001166EE,
       
    37     0x001166DD,
       
    38     0x001166CC,
       
    39     0x001166BB,     // 241
       
    40     0x00FEFEFE,     // undefined
       
    41     0x00001100,
       
    42     0x0011BBFF,  
       
    43     0x00FEFEFE,     // undefined
       
    44     0x00FEFEFE,     // undefined
       
    45     0x00FEFEFE,     // undefined
       
    46     0x00FEFEFE,     // undefined
       
    47     0x0000EEFF,     // coding yellow
       
    48     0x000000DD,     // coding red
       
    49     0x00FF7700,     // coding blue
       
    50     0x0000EE00,     // coding green
       
    51     0x00339900,     // nokia brand color green 253
       
    52     0x00CC3300,     // nokia brand color blue 254
       
    53     0x00DD00DD      // mask pink
       
    54 	};
       
    55 
       
    56 
       
    57 TRgb TSchemeOrange::Color(int aIndex) const
       
    58 	{
       
    59 	// color rotation for palette
       
    60 	if (aIndex == 0)
       
    61 		return TRgb(0x00000000);
       
    62 	else if (aIndex == 0xff)
       
    63 		return TRgb(0x00ffffff);
       
    64 	else if (aIndex == 215)
       
    65 		return TRgb(0x00dd00dd);
       
    66 	else if (aIndex < StandardGrayBase)
       
    67 		{
       
    68 		return TRgb(KColorCubeMap[aIndex/36], KColorCubeMap[(aIndex/6)%6], KColorCubeMap[aIndex%6]);
       
    69 		}
       
    70 	else if (aIndex < SchemeSpecificColorBase)
       
    71 		{
       
    72 		int gray = aIndex - StandardGrayBase;
       
    73 		return TRgb(KStandardGray[gray], KStandardGray[gray], KStandardGray[gray]);
       
    74 		}
       
    75 	else
       
    76 		{
       
    77 		return TRgb(KSchemeOrange[aIndex - SchemeSpecificColorBase]);
       
    78 		}
       
    79     };
       
    80 
       
    81 // End of File