//
//  XTHtmlColour.h
//  XTads
//
//  Created by Rune Berg on 13/03/2020.
//  Copyright © 2020 Rune Berg. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "osxtads.h"
#import "osifc.h"


//NS_ASSUME_NONNULL_BEGIN

@interface XTHtmlColor : NSObject

+ (XTHtmlColor *)forAttributeValue:(NSString *)attrValue;

+ (XTHtmlColor *)forAttributeValueLink;

+ (XTHtmlColor *)forNSColor:(NSColor *)color;

+ (XTHtmlColor *)forOsifcColor:(os_color_t)osifcColor;

@property (readonly) NSString *attrValue;

@property (readonly) NSColor *color;

@property (readonly) BOOL isForParameterized;

@property (readonly) BOOL isTransparent;

+ (BOOL)safeCompare:(XTHtmlColor *)colorA to:(XTHtmlColor *)colorB;

@end

//NS_ASSUME_NONNULL_END
