Photoshop : Actions - RGB sometimes recorded/shown as a float

  • 1
  • Problem
  • Updated 3 years ago
  • Not a Problem
  • (Edited)
ISSUE: When setting a color in RGB mode while recording an action script the RGB triplets are often not rounded to whole numbers but they are shown as a float.



Examples:
RGB color (48, 144, 197) is shown in "Actions" window as (48, 143.996, 197)
(154, 96, 140) -> (153.996, 96, 139.996)
(154, 154, 154) -> (153.996, 153.996, 153.996)

SW: Ps CC 2015, Win 10 Pro
Photo of MilP

MilP

  • 58 Posts
  • 6 Reply Likes

Posted 3 years ago

  • 1
Photo of MilP

MilP

  • 58 Posts
  • 6 Reply Likes
Please could you correct this 13 years old "bug" with actions? It existed already in Photoshop v7.0.1 and it is still there in Photoshop CC 2015.1. It seems like a minor issue, but I am afraid that the error can get to the saved action scripts. I cannot prove that it has impact on saved action script, but there is a possibility, I guess. Thank you.
Photo of MilP

MilP

  • 58 Posts
  • 6 Reply Likes
Re: Yes, Photoshop should record color channel values as floating point numbers where necessary, and display them as floating point numbers if they were recorded that way.

I do not agree with the second part of your sentence. I think that if you are going to display any number to a user you should first round it to a meaningful number of decimal places. In RGB mode the color channel values should be whole numbers, because they are defined that way. There is no added value to a user if you display the channel values on 3 decimal places. So why to bother them with such redundant information?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 811 Reply Likes
The actions palette has no idea what document you are going to apply the color values to. So should it round to 8 bit, 16 bit, or 32 bit float?

While some of the UI defines color values in integers, the underlying values may be a higher precision integer or floating point, and need to be saved and read back in as high precision values.

Just because you think in 8 bits, does not mean that the information is limited to 8 bits.
Photo of MilP

MilP

  • 58 Posts
  • 6 Reply Likes
The thing is that when I am using RGB sliders in Color window I cannot set any other number than the one ranging from 0 to 255. The number is always integer, no matter what. The Photoshop will not accept decimal number even I enter it into the input box (the same applies to HSB sliders, Lab sliders and CMYK sliders) and it does not change with a bit depth. I understand that Photoshop is working internally with decimal numbers, but it looks weird when I set the RGB color to (154, 154, 154) and in the action window I will see decimal numbers like this (153.996, 153.996, 153.996). The other thing is a color picker but when I am using it in higher bit depths the action window will always display RGBs as decimal numbers rounded to 3 decimal places. I do not believe that with this precision you can display all possible color values in 32 bit/channel RGB space, but you are right I am limited to 8 bit and there are only special occasions when I need to switch to higher bit depths. Interesting is that when I use Lab sliders the action window shows numbers as integers unless I will use the color picker. Besides, rounding channel values always on 3 decimal places is not ideal: For example, there is a minimum precision of Lab coordinates that you must comply if you want to display all possible colors of 24-bit RGB space (8bit/channel). Otherwise multiple Lab coordinates will lead to the same color in RGB space.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 811 Reply Likes
The display in the actions palette is only 3 decimal places, but the value underneath is a 32 bit floating point value.

Again, this is entirely correct behavior.
Photo of MilP

MilP

  • 58 Posts
  • 6 Reply Likes
Alright, thank you.