Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Colors are encoded weirdly

    Help
    2
    3
    231
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Doriphor
      Doriphor last edited by Doriphor

      I'm getting some serious issues with colors. I hadn't noticed them until now, but the colors feel awfully off. For example, compare

      • the color you see in your web browser when you search for RGB 140 20 20
      • the color that displays on-screen when you do
      vector color
      color.r = 140/255
      color.g = 20/255
      color.b = 20/255
      color.a = 1.0
      circle(100, 100, 100, 100, color, 0}
      update()
      loop
      repeat 
      

      And no this isn't due to the monitor or TV since it also displays weird on the Switch's screen.

      It's almost as if the color scale is linear instead of gamma-encoded.

      Sure enough, if you gamma-encode the color before displaying it, it shows up properly

      vector color
      color.r = pow(140/255, 2.2)
      color.g = pow(20/255, 2.2)
      color.b = pow(20/255, 2.2)
      color.a = 1.0
      circle(100, 100, 100, 100, color, 0}
      update() 
      loop
      repeat
      

      Can anybody provide some help with this? I mean I could write a helper function to encode all the colors on the fly but that would be annoying and this does seem to be a bug...

      Sorry in advance if I misused some of the technical terms by the way :)

      1 Reply Last reply Reply Quote 0
      • pianofire
        pianofire Fuze Team last edited by

        Take a look at this thread: https://fuzearena.com/forum/topic/1242/how-to-convert-from-srgb-to-fuze-linear-rgb

        Doriphor 1 Reply Last reply Reply Quote 2
        • Doriphor
          Doriphor @pianofire last edited by

          @pianofire oh so that's the intended behavior? That's a very odd choice IMO. Thank you!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post