Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

alert value h s b

Advocate ,
Nov 17, 2018 Nov 17, 2018

I would like a warning window if possible

with the values H S B

as shown.

Color-Picker-Foreground-Color-2018-11-17-21-40-51.jpg

TOPICS
Actions and scripting
468
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 17, 2018 Nov 17, 2018

I hope that I understand you right:

you want to open the color picker and gets the hsb value of this color?

If so, try this:

app.showColorPicker();

var col = app.foregroundColor.hsb;

alert(col.hue);

alert(col.saturation);

alert(col.brightness);

hsb.hue + hsb. saturation + hsb.brightness

Have fun

Translate
Adobe
Community Expert ,
Nov 17, 2018 Nov 17, 2018

I hope that I understand you right:

you want to open the color picker and gets the hsb value of this color?

If so, try this:

app.showColorPicker();

var col = app.foregroundColor.hsb;

alert(col.hue);

alert(col.saturation);

alert(col.brightness);

hsb.hue + hsb. saturation + hsb.brightness

Have fun

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 18, 2018 Nov 18, 2018

Just what I needed

a question

I would like to display only the figures before the point

can the figures be deleted later?

aas.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 18, 2018 Nov 18, 2018
LATEST

Try

alert(Math.round(col.hue));

or

alert(Math.ceil(col.hue));

What you need.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines