# How to extract the color of the bar-stacked used in BulletGauge?

How can I extract the colors used by default in the BulletGauge?

• You mean you want to know which colours are used in the bar, the darkred,blue,greenish etc.? Commented Aug 16, 2016 at 8:29
• @Feyre For a rude use I would use a pick up color of paint-design colors. What I want is the list of colors, as colors as mathematica knows it, or as you describe for a future swaping Commented Aug 16, 2016 at 8:34

### Trace

A programmatic approach using Trace:

Trace[
BulletGauge[{1, 1.8, 3, 3.4, 4, 5}, {2.4, 2.9}, {0, 3.5, 4.8}],
_ColorData
] // Flatten // First

ColorData[63, 1]


Check:

ColorData[63, "ColorList"]


Related examples:

### Spelunking

This can also be found by spelunking the definition of BulletGauge itself using tools from:

One find that the inner definition is ChartingiLinearGauge

Needs["GeneralUtilities"]

PrintDefinitions @ ChartingiLinearGauge


Within that one finds a hard-coded color source:

ChartingpadList[{{ColorData[63][#1] &, None}}, numvals]

• @mr-wizard Yes, that´s the answer! Commented Aug 16, 2016 at 8:45

Here's what I did:

All Mathematica plotting functions use a range of ColorData[].

Table[ColorData[i, "ColorList"], {i, 1, 96}] // TableForm


Prints all the ColorData lists. From this you can count (you can change the range of the Table[]), that the one you want is nr63.

ColorData[63, "ColorList"]


Gives this list.

colours = ColorData[63, "ColorList"]
a = colours[[5]]
colours[[5]] = colours[[6]];
colours[[6]] = a
BulletGauge[{1, 1.8, 3, 3.4, 4, 5}, {2.4, 2.9}, {0, 3.5, 4.8},
ImageSize -> Large, GaugeStyle -> colours]


• ok, I like it,... but... How can I know that BulletGauges use the secuence number 63? Commented Aug 16, 2016 at 8:43
• @MikaIke I updated the answer on your other question. Commented Aug 16, 2016 at 8:45
• @MikaIke Which has now been rolled back, so I edited my answer here. Commented Aug 16, 2016 at 8:48