public void addColor(BmpColor color) throws AWTException {
        if (colors.size() >= MAX_COLORS) {
            throw new AWTException("Maximum of 256 colors exceeded");
        }
        Boolean isNewColor = true;
        for (BmpColor c : colors) {
            if (c.equals(color)) {
                isNewColor = false;
            }
        }
        if (isNewColor) {
            colors.add(color);
        }
    }