ImHex-Patterns icon indicating copy to clipboard operation
ImHex-Patterns copied to clipboard

Photoshop ASE palette pattern

Open mgerhardy opened this issue 2 years ago • 1 comments

struct Block {
    be u16 Type;
    be u32 BlockLength;
    be u16 NameLength;
    be char16 Name[NameLength];
    if (Type == 1) {
        char ColorSpace[4];
        if (ColorSpace == "RGB " || ColorSpace == "LAB ") {
            be float rgb[3];
        } else if(ColorSpace == "CMYK") {
            be float cymk[4];
        } else if (ColorSpace == "Gray") {
            be float gray;
        }
        be u16 colorType;
    } else if (Type == 49153) {
        u8 unknown[BlockLength - 4];
    } else if (Type == 49154) {
        u8 unknown[BlockLength - 4];
    } else {
        u8 unknown[BlockLength];
    }
};

struct Header {
    u8 magic[4];
    be u16 versionMajor;
    be u16 versionMinor;
    be u32 blocks;
    Block b[blocks];
};

Header hdr @0x00;

files on lospec:

https://lospec.com/palette-list/periwinkle-is-a-weird-word.ase

mgerhardy avatar Nov 09 '23 16:11 mgerhardy

Have you considered opening a PR with your pattern?

C3pa avatar Jul 11 '24 17:07 C3pa