Add script traceback to new HSV warnings

Earlier this week, Roblox toggled a new warning regarding HSV out of range values. This is fine, but as you can see my codebase uses this function in several places. I cannot be expected to test all of them to find out what is causing problems.

This was an issue recently with the new density warnings, and Roblox added a simple script traceback in the beginning of the warning telling you exactly where the call happened. Would be great if this warning could either be reverted, or improved with a script traceback.

7 Likes

Hi @Usering , thanks for the feedback, I can create an internal ticket and see if we can improve the warnings.

2 Likes

Is there any update on this? I have 23 matches for fromHSV in my codebase, it could be any number of those and currently I have no idea which one is causing issues without doing extensive testing to determine them.

Hi @Usering, we’ve created an internal ticket and are aware of the issue. However, right now, we’re in the process of prioritizing some other tasks, but please know that addressing your concern is important to us. We’ll do our best to handle it as soon as we can, and thank you for your understanding and patience.

1 Like

That’s alright, I appreciate the response!

Still getting these warning spams. Is this part of a flag that can be disabled? This warning doesn’t contribute anything to the developer experience, and only makes it harder for games that extensively use HSV api.

Hi @Usering , there is no flag only for turning off this warning. Since we don’t want to clamp values without letting developers know, the warning is there for this reason. We’ll see if we can expedite our work to improve the warning details so that developers can fix accordingly. Sorry for the inconvenience.

Hey @Usering , just an update that the change (to link the warning messages to certain code lines and files) was checked in recently and hopefully will be out for everybody in a few weeks. Thanks for your patience!

2 Likes

Hi @Usering , we have just rolled out a change to Studio (App/In-game will follow soon) that will help navigate to the code lines if color values are getting clamped. Please update Studio and verify! Thanks!

1 Like

Thanks, I can see where the error is occurring now. But why is it warning me on converting from a Color3 to HSV values via color3Value:ToHSV()? I have no control over what those values are. This warning would make sense if I was passing out of ranges values into Color3.fromHSV()

Here’s my code, which despite me clamping the values

1 Like

Thanks for sharing your concern. Usually, Color3 RGB values should be within the range of [0, 255], and any values outside of this range will be clamped automatically by Studio, which could trigger the warning. You mentioned that you don’t have control over the defaultColor values. Could you please clarify where and how defaultColor is being initialized or assigned in your code? Thanks

1 Like

We use overblown RGB values on textures/decals to replicate a glowing effect on light meshes. That specific example was hue shifting one of these overblown color values, but looking at it now it appears entirely unnecessary.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.