Jump to content

Hexcolor


pixelmagic

Recommended Posts

Hi,

 

I am playing with the xml config files and came upon something weird with the colors.

 

The is a option on setting the color with <HexColor></HexColor>, where the docs say this about it:

 

HexColor
6 digit hexadecimal color code with leading #(e.g. #ff0000 for red).

 

Link

 

In the example it states :

<RGBAColorEffect>
  <Name>Name of RGBAColorEffect</Name>
  <ToyName>Name of Toy</ToyName>
  <LayerNr>0</LayerNr>
  <ActiveColor>
    <HexColor>#00000000</HexColor>
  </ActiveColor>
  <InactiveColor>
    <HexColor>#00000000</HexColor>
  </InactiveColor>
  <FadeMode>Fade</FadeMode>
</RGBAColorEffect>

The difference being that a 'normal' hex color being 6 chars and here it states 8.

 

When using a ledwiz file as base config and then save from the DOF main console as table xml it also gives the 8 digits and not the 6.

    <RGBAColorEffect>
      <Name>Ledwiz 100 Column 05 Setting 05 RGBAColorEffect</Name>
      <ToyName>LedWiz 100 Column 05</ToyName>
      <LayerNr>5</LayerNr>
      <ActiveColor>
        <HexColor>#FF0000FF</HexColor>
      </ActiveColor>
      <InactiveColor>
        <HexColor>#FF000000</HexColor>
      </InactiveColor>
      <FadeMode>Fade</FadeMode>
    </RGBAColorEffect>

Is this correct or is it possibly a bug ?

Link to comment
Share on other sites

  • Content Provider

Colors in DOF can have a alpha value. These are digits 7 & 8.

 

If the alpha part is not set DOF assumes that color 000000 (black) is fully transparent and all other color are fully opaque.

 

The alpha channels are used in the layer model of DOF.

Link to comment
Share on other sites

Very clear, thank you. I was set on the wrong track by the example with 6 digits.

Truly amazing piece of software you have created, aspecialy the effects and stacking of them is very nice, but also complicated.

Can't wait until the ws2812 board is ready, want to see what i can do with the images.

Pixel

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...