rgbEx and rgbEx255

0 favourites
  • 6 posts
  • carrying this over from this thread (since it won't let me reply because it is too old -1 year- even though it is totally relevant and could help people)

    construct.net/en/forum/construct-3/general-discussion-7/rgbex-misleading-155134

    dop2000

    rgb() takes numbers in 0-255 range, rgbex() uses 0-100 range.

    Try rgbex255() or rgba255()

    this doc is confusing and seems to contradict what you are saying there. Does the 255 and "Ex" mean the same thing or does it mean something else?

    I guess I'm asking --- what does the "Ex" mean?

    EDIT: nevermind, I think you answered it here that "Ex" meant expression from c2

    construct.net/en/forum/construct-3/how-do-i-8/ex-rgbex-154534

  • (the forum times out every time I'm trying to post a reply)

    My guess is that "Ex" means nothing. Scirra just couldn't use "rgb" because it's an old expression from C2 and they wanted to preserve compatibility with old projects. So they named two new expressions rgbEx and rgbEx255

  • dop2000 thanks...

    yeah I know! all day the forum has been timing out!

  • rgb is an old expression from C2 that was deprecated years ago, so you'll most likely never encounter it unless importing an old project. One of the reasons it was deprecated is it is inconsistent with the new expressions, and removing it was meant to avoid this kind of confusion, but it still comes up with old projects.

    I think the manual entry is clear if you note that rgb is not in the list as it's deprecated. The four existing expressions are consistent: rgbEx and rgba work 0-100, and rgbEx255 and rgba255 work 0-255. In other words if it says 255 then it's 0-255, otherwise it's 0-100. But the old rgb expression breaks that rule: it uses 0-255. But it's hidden in Construct 3.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • so in summary 'Ex' basically means no alpha channel (or one less argument parameter)?

    wow, not sure why that is confused me so much! its like coming in late to a conversation!

  • "Ex" means "extended" as it also supports a wider dynamic range and higher precision. But the main reason is that the name "rgb" was already taken, so we had to think of something else to call it. The "rgb" and "rgba" parts of the name refers to the components it uses.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)