Making a Recalbox theme

45 pages · 8 sections
FRENESDE Show everything Create my theme

Colors and gradients

RRGGBB, transparency, and the eight corners.

The spelling

A color is written in hexadecimal, without a hash:

<color>2E447C</color>       <!-- opaque -->
<color>2E447C80</color>     <!-- half transparent -->

The most useful transparency values

Everyone knows a color's code. The two opacity characters, much less:

OpacityTo writeOpacityTo write
0% — invisible0060%99
10%1A70%B3
20%3375%BF
25%4080%CC
30%4D90%E6
40%6695%F2
50%80100% — opaqueFF

The math, if your value is not there: the percentage × 255, written in hexadecimal.

Gradients

box and image accept one color per edge or per corner. Giving two is enough to get a gradient.

colorTop colorBottom vertical gradient colorLeft colorRight horizontal gradient colorTopLeft colorBottomRight four-corner gradient giving TWO colors is enough to get a gradient
PropertyEffect
colorTop + colorBottomvertical gradient
colorLeft + colorRighthorizontal gradient
colorTopLeft, colorTopRight, colorBottomLeft, colorBottomRightfour-corner gradient
<box name="ombre-du-haut">
  <pos>0 0</pos>
  <size>1 0.3</size>
  <colorTop>00000080</colorTop>
  <colorBottom>00000000</colorBottom>
</box>

A gradient from half-transparent black to fully transparent: the classic veil under which a title stays readable whatever the image behind.

Tinting an image

On an image component, color does not fill: it multiplies the image. A white image therefore takes exactly the given color — that is how you recolor an icon without redoing the file.

<image name="etoile">
  <path>${root}/data/arts/etoile-blanche.svg</path>
  <color>FFC24B</color>      <!-- the star turns golden -->
</image>