Patchwork 3D Community 2021.1 X5

Importing Gradient Ramps in .csv Format

Gradient ramp files in CSV format are supported.

With the Import gradient image404.png button, you can import KGR gradient files generated by the Gradients editor, or CSV gradient files.

  • Select the gradient file in KGR or CSV format that you would like to import from your workstation.

  • Click on Open to validate.

The imported gradient is added to the gradient palette.

For a CSV file, the name of the CSV file is used as the name of the new gradient.

Valid .csv files begin with a header line, followed by lines listing the gradient angle and the colors to apply at that angle. The colors are expressed in one of the following encodings:

The values contained in each line must be separated by a comma (,); if the line contains decimal numbers, they must use a point (.) as the decimal separator.

Parameter

Accepted Values

Header as first line

Required

Value separator

,

Decimal separator

.

End of line

No special character

If the file structure is not respected, the importer will stop. The error message that is show will indicate the line in your file where the first structural error was found.

RGB Profile

Parameter

Accepted Values

Required header line

angle,R,G,B

Angle

Whole numbers from 0 to 90 inclusive

R

Whole numbers from 0 to 255 inclusive

G

Whole numbers from 0 to 255 inclusive

B

Whole numbers from 0 to 255 inclusive

If the accepted values are not respected, the importer will replace any value that is out of range with the minimum or maximum accepted value, whichever is closer. For example, an angle value of 100 degrees will be replaced by the maximum accepted value, that is, 90.

Example

angle,R,G,B 0,255,255,255 1,255,255,255 2,255,255,255 3,255,255,255 … 90,255,204,0

CIE Lab Profile

Parameter

Accepted Values

Required header line

angle,L,a,b

Angle

Whole numbers from 0 to 90 inclusive

L

Decimals from -128.0 to 128.0 inclusive

a

Decimals from 0.0 to 100.0 inclusive

b

Decimals from 0.0 to 100.0 inclusive

If the accepted values are not respected, the importer will replace any value that is out of range with the minimum or maximum accepted value, whichever is closer. For example, a L value of -130 will be replaced by the minimum accepted value, that is, -128.

Example

angle,L,a,b 0,100.0,0.0,0.0 1,100.0,0.0,-0.000001 2,100.0,0.0,-0.000001 3,100.0,0.0,-0.000001 … 90,88.122,1.933,50.797