/*
 * SDK Pullenti Unitext, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software. 
 * This class is generated using the converter UniSharping (www.unisharping.ru) from Pullenti C# project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */


class ColorRef {
    
    constructor() {
        this._isauto = false;
        this._r = 0;
        this._g = 0;
        this._b = 0;
    }
    
    get isAuto() {
        return this._isauto;
    }
    set isAuto(value) {
        this._isauto = value;
        return this._isauto;
    }
    
    get R() {
        return this._r;
    }
    set R(value) {
        this._r = value;
        return this._r;
    }
    
    get G() {
        return this._g;
    }
    set G(value) {
        this._g = value;
        return this._g;
    }
    
    get B() {
        return this._b;
    }
    set B(value) {
        this._b = value;
        return this._b;
    }
    
    static fromBytes(value, offset) {
        let c = new ColorRef();
        c.R = value[0];
        c.G = value[1];
        c.B = value[2];
        c.isAuto = value[3] !== (0);
        return c;
    }
}


module.exports = ColorRef