Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Steffen Pedersen 4 posts 24 karma points
    Apr 03, 2012 @ 17:01
    Steffen Pedersen
    0

    wrong alpha value when using rgba

    When i use the RGBA method i the the alpha value as a comma value. This should be with a dot instead.

    So the alpha value: 80 should return 0.8 instad of 0,8.

    Best regards

    Steffen

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Apr 03, 2012 @ 20:34
    Warren Buckley
    0

    Hi Steffan,
    Thanks for reporting this to me.
    When you are outputting the alpha value how are you using it, is there are any reason why you are not outputting the combined RGB or RGBA and Hex values?

    I just want to understand your use of using the Alpha value on it's own.
    I will look into a fix in the mean time. Perhaps a seperate value such as AlphaAsDecimal or similar you could use to output the value?

    Cheers,
    Warren :) 

  • Steffen Pedersen 4 posts 24 karma points
    Apr 04, 2012 @ 14:43
    Steffen Pedersen
    0

    Hi Warren

    I'm using the Alpha rgb value to specify the background of a div box. so it is used like this <div style="background: rgba(DynamicModel.color.rgba)">

    This is as far as i remember the way the documentation suggests it. I have no specific need of using the alpha value on its own. But the rgba method returns the alpha value as a comma seperated number instead of a dot. I'm not sure if it could be a culture specific problem as decimal values in Denmark are seperated by comma?

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Apr 04, 2012 @ 14:53
    Warren Buckley
    0

    Hi Steffan,
    Ah OK so looks like a culture issue with my code and the decimal being stored as a comma as apposed to a fullstop/period/dot
    I will look into this later this evening on how best to resolve this.

    Warren

Please Sign in or register to post replies

Write your reply to:

Draft