Adobe Photoshop / Jasc Paint Shop Pro
Byte-order: Big-endian
Default Gradients.grd (Adobe Photoshop 5)
000000 38 42 47 52 00 03 00 0F 18 46 6F 72 65 67 72 6F 8BGR.....Foregro
000010 75 6E 64 20 74 6F 20 42 61 63 6B 67 72 6F 75 6E und to Backgroun
000020 64 00 02 00 00 00 00 00 00 00 32 00 00 00 00 00 d.........2.....
......
000770 00 FF 00 00 0E 3D 00 00 00 32 00 FF 00 00 0E 66 .ÿ...=...2.ÿ...f
000780 00 00 00 32 00 00 00 00 10 00 00 00 00 32 00 00 ...2.........2..
000790 00 00 00 00 00 00 ......
File signature 4*char (8BGR)
Version 1*int16 (3)
Number of gradients 1*int16
Gradient entries
Gradient entries
.......
000060 FF 00 00 00 00 00 00 19 46 6F 72 65 67 72 6F 75 ÿ.......Foregrou
000070 6E 64 20 74 6F 20 54 72 61 6E 73 70 61 72 65 6E nd to Transparen
000080 74 00 02 00 00 00 00 00 00 00 32 00 00 00 00 00 t.........2.....
000090 00 00 00 00 00 00 01 00 00 10 00 00 00 00 32 00 ..............2.
0000A0 00 00 00 00 00 00 00 00 00 00 01 00 02 00 00 00 ................
0000B0 00 00 00 00 32 00 FF 00 00 10 00 00 00 00 32 00 ....2.ÿ.......2.
0000C0 00 00 00 00 00 00 00 0C 42 6C 61 63 6B 2C 20 57 ........Black, W
Gradient name string of length (int8) characters ("Pascal string")
Number of stops 1*int16
Stop offset 1*int32 [0:4096]
Stop midpoint 1*int32 (%)
Color model 1*int16 (0 ⇒ RGB, 1 ⇒ HSV, 2 ⇒ CMYK, 7 ⇒ Lab, 8 ⇒ Grayscale)
Color values 4*int16
Color type 1*int16 (0 ⇒ User color, 1 ⇒ Foreground, 2 ⇒ Background)
Number of transparency stops 1*int16
Transparency stop offset 1*int32 [0:4096]
Transparency stop midpoint 1*int32 (%)
Opacity 1*int16 [0:255]
Reserved for future use (?) 6 bytes (always 0 in the files I've analyzed...)
For that part, most of the work was already done by the re-lab team. Thanks to them!
If version is 5 (instead of 3), it's followed by 4 bytes "00 00 00 10" (for Photoshop 6.0) and a descriptor, as documented in the "Actions" section of the Photoshop specifications. For a description of the class IDs and keys, you can have a look at PSConstants.js from the xtools project.
Macromedia/Adobe Flash
see here
Gimp
StarOffice / OpenOffice.org / LibreOffice
<?xml version="1.0" encoding="UTF-8"?> <office:gradient-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script"> <draw:gradient draw:name="Gradient 1" draw:style="linear" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/> <draw:gradient draw:name="Gradient 2" draw:style="axial" draw:start-color="#000080" draw:end-color="#800000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="300" draw:border="10%"/> <draw:gradient draw:name="Gradient 3" draw:style="radial" draw:cx="30%" draw:cy="30%" draw:start-color="#800000" draw:end-color="#ffff00" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="20%"/> <draw:gradient draw:name="Gradient 4" draw:style="ellipsoid" draw:cx="40%" draw:cy="40%" draw:start-color="#ffff00" draw:end-color="#008000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="30%"/> <draw:gradient draw:name="Gradient 5" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#008000" draw:end-color="#800080" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1200" draw:border="40%"/> <draw:gradient draw:name="Gradient 6" draw:style="rectangular" draw:cx="60%" draw:cy="60%" draw:start-color="#800080" draw:end-color="#ffff00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1900" draw:border="50%"/> <draw:gradient draw:name="Linear blue/white" draw:style="linear" draw:start-color="#000080" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/> <draw:gradient draw:name="Radial green/black" draw:style="radial" draw:cx="35%" draw:cy="30%" draw:start-color="#008000" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="30%"/> <draw:gradient draw:name="Rectangular red/white" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#ff0000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="5%"/> <draw:gradient draw:name="Square yellow/white" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#e6ff00" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="2700" draw:border="0%"/> <draw:gradient draw:name="Linear magenta/green" draw:style="linear" draw:start-color="#6b0094" draw:end-color="#00ff00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="150" draw:border="25%"/> <draw:gradient draw:name="Linear yellow/brown" draw:style="linear" draw:start-color="#ffff66" draw:end-color="#996633" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="45%"/> <draw:gradient draw:name="Radial red/yellow" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#ff3333" draw:end-color="#e6ff00" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/> <draw:gradient draw:name="Ellipsoid blue grey/light blue" draw:style="ellipsoid" draw:cx="50%" draw:cy="50%" draw:start-color="#e6e6ff" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/> <draw:gradient draw:name="Axial light red/white" draw:style="axial" draw:start-color="#ff0000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="50%"/> </office:gradient-table>
<SCRIBUSGRADIENT> <COLOR Spot="0" Register="0" NAME="Black" CMYK="#000000ff" /> <COLOR Spot="0" Register="0" NAME="White" CMYK="#00000000" /> <Gradient Name="Black to White" > <CSTOP RAMP="0.000" TRANS="1.000" SHADE="100" NAME="Black" /> <CSTOP RAMP="1.000" TRANS="1.000" SHADE="100" NAME="White" /> </Gradient> </SCRIBUSGRADIENT>
In version 1.5, gradients are included in the color swatches.