Colour Listing for FORE and BACK colours

  • Hi All,

    I haven't had much luck searching for a list of colour codes to use within FORE_COLOR and BACK_COLOR format options in SSAS to use on measures. My confusion is that the help topic mentions it uses RGB colours, yet there is only one value in the format command but RGB colours refer to 3 values to obtain the correct colour, eg:

    FORE_COLOR(THIS) = 255;

    There is only one value allowed here as far as I can determine. As you can tell I dont know a lot about colour formatting measures, can anyone help me with how this works.

    What I'd really like is a resource that provides me with the colour name and the associated code for it.

    Thanks in advance.

  • My mistake, I've worked out how this is done. Some examples on the web could probably have been written a bit better. Here is the format for the command.

    FORE_COLOR(THIS) = VBAMDX.RGB(255,0,0);

    Hope it helps anyone else wondering how to do this.

  • Some more examples on how to do this...

    -- Setting default black/white for all measures.

    SCOPE (

    [Measures].AllMembers

    );

    BACK_COLOR(THIS) = VBAMDX.RGB(255,255,255);

    FORE_COLOR(THIS) = VBAMDX.RGB(0,0,0);

    END SCOPE;

    -- Overriding that to specific colours for other members

    BACK_COLOR(

    {

    [Measures].[Measure Name 1], [Measures].[Measure Name 2]

    }

    ) = VBAMDX.RGB(204,204,102);

    -- Using conditional formatting

    BACK_COLOR (

    {

    [Measures].[Measure Name 1], [Measures].[Measure Name 2]

    }

    ) = IIF([Measures].[Has Actuals] = 1, VBAMDX.RGB(153,255,153), VBAMDX.RGB(102,204,255));

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply