0

Importing RGB Color Data

Just realized I posted this under Ideas & Suggestions the first time... oops.

I'm trying to import RGB color data from a .csv file and assign the values to a color field in a table. I would like to think this is possible, but I can't seem to get it to work.

Any suggestions?
 

4 replies

null
    • Avient Specialty Inks
    • Bill.1
    • 5 yrs ago
    • Reported - view

    To elaborate, I have triend importing the code as a comma deliminated string and also with the R, G and B values in separate columns, but I can't figure out the code necessary to assign those values to the RGB sliders in a color field.

    • Mconneen
    • 5 yrs ago
    • Reported - view

    @William, 

    Here ya go..   I created a simple table.. three columns (R, G, B)... similar to your import from the CSV file..  then a button to set the color.. You could also use a formula.

    setColor

    Here is the button logic.. 

    let t := this;
    t.(Color := color("rgb(" + t.R + "," + t.G + "," + t.B + ")"))

    • Avient Specialty Inks
    • Bill.1
    • 5 yrs ago
    • Reported - view

    @Mconneen,

    Thanks. This definitely helps, but is there a way to have this happen autmatically when importing the data and not with a button?

    • Avient Specialty Inks
    • Bill.1
    • 5 yrs ago
    • Reported - view

    Got it! I just assigned this to the Color field:

    color("rgb(" + R + "," + G + "," + B + ")")

Content aside

  • 5 yrs agoLast active
  • 4Replies
  • 1658Views