Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Tests/ColorObjects/test_ColorObjectConversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import unittest

# Custom Library
from AthenaColor.Objects.Color.ColorObjectConversion import *
from AthenaColor.Objects.Color.ColorSystem import RGB,HEX,CMYK,HSL,HSV,RGBA,HEXA
from AthenaColor.Color.ColorObjectConversion import *
from AthenaColor.Color.ColorSystem import RGB,HEX,CMYK,HSL,HSV,RGBA,HEXA

# Custom Packages
# ----------------------------------------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Tests/ColorObjects/test_ColorTupleConversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest

# Custom Library
from AthenaColor.Objects.Color.ColorTupleConversion import *
from AthenaColor.Color.ColorTupleConversion import *

# Custom Packages
# ----------------------------------------------------------------------------------------------------------------------
Expand Down
30 changes: 0 additions & 30 deletions Tests/Data/test_ANSIcodes.py

This file was deleted.

2 changes: 1 addition & 1 deletion Tests/Functions/test_ANSIsequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest

# Custom Library
from AthenaColor.Functions.ANSIsquences import ColorSequence, NestedColorSequence
from AthenaColor.Functions.ANSIsequences import ColorSequence, NestedColorSequence

# Custom Packages

Expand Down
4 changes: 2 additions & 2 deletions Tests/Functions/test_BlendModes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import unittest

# Custom Library
from AthenaColor.Objects.Color.ColorSystem import RGB, RGBA
from AthenaColor.Functions.BlendModes import *
from AthenaColor.Color.ColorSystem import RGB, RGBA
from AthenaColor.Color.BlendModes import *


# Custom Packages
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setuptools.setup(
name="AthenaColor",
version="4.2.0",
version="5.0.0",
author="Andreas Sas",
author_email="",
description="Package to support full usage of RGB colors in the Console.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# Custom Library

# Custom Packages
from AthenaColor.Objects.Color.ColorSystem import ColorSystem, RGBA
from AthenaColor.Objects.Color.ColorObjectConversion import to_RGBA
from AthenaColor.Objects.Color.ColorTupleConversion import NormalizeRgba
from AthenaColor.Color.ColorSystem import ColorSystem, RGBA
from AthenaColor.Color.ColorObjectConversion import to_RGBA
from AthenaColor.Color.ColorTupleConversion import NormalizeRgba

# ----------------------------------------------------------------------------------------------------------------------
# - Support Code -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Custom Library

# Custom Packages
import AthenaColor.Objects.Color.ColorTupleConversion as CTC
from AthenaColor.Objects.Color.ColorSystem import ColorSystem,RGB,HEX,CMYK,HSL,HSV,RGBA,HEXA, color_conversions_mapped
import AthenaColor.Color.ColorTupleConversion as CTC
from AthenaColor.Color.ColorSystem import ColorSystem,RGB,HEX,CMYK,HSL,HSV,RGBA,HEXA, color_conversions_mapped

# ----------------------------------------------------------------------------------------------------------------------
# - All -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Custom Packages
import AthenaColor.Functions.DunderFunctions as CSD
from AthenaColor.Objects.Color.ColorTupleConversion import *
from AthenaColor.Color.ColorTupleConversion import *
from AthenaColor.InitClass import init
from AthenaColor.Functions.Constraints import Constrain

Expand All @@ -35,12 +35,13 @@ def wrapper(self,other:ColorSystem|int|tuple):
# - Actual Color System -
# ----------------------------------------------------------------------------------------------------------------------
class ColorSystem(ABC):
string_seperation=";"
def __init__(self, *_):
# no 'ColorSystem' can be created on its own
raise PermissionError

def __str__(self)->str:
return init.stringSeparation.join(str(c) for c in self)
return self.string_seperation.join(str(c) for c in self)

@abstractmethod
def __repr__(self)->str:...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Custom Library

# Custom Packages
from AthenaColor.Objects.Color.ColorSystem import RGB
from AthenaColor.Color.ColorSystem import RGB

# ----------------------------------------------------------------------------------------------------------------------
# - Code -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
# Custom Library

# Custom Packages
from AthenaColor.Objects.Color.ColorTupleConversion import cmyk_to_rgb,hsv_to_rgb,hsl_to_rgb
from AthenaColor.Functions.ANSIsquences import ColorSequence
from AthenaColor.Data.HtmlColors import HtmlColorObjects
from AthenaColor.Objects.Color.ColorSystem import RGB, RGBA, HEX, HEXA, HSV, HSL, CMYK
from AthenaColor.Color.ColorTupleConversion import cmyk_to_rgb,hsv_to_rgb,hsl_to_rgb
from AthenaColor.Functions.ANSIsequences import ColorSequence
from AthenaColor.Color.HtmlColors import HtmlColorObjects
from AthenaColor.Color.ColorSystem import RGB, RGBA, HEX, HEXA, HSV, HSL, CMYK

# ----------------------------------------------------------------------------------------------------------------------
# - All -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Custom Library

# Custom Packages
from AthenaColor.Functions.ANSIsquences import ColorSequence
from AthenaColor.Functions.ANSIsequences import ColorSequence

# ----------------------------------------------------------------------------------------------------------------------
# - All -
Expand Down
37 changes: 37 additions & 0 deletions src/AthenaColor/Console/Styling/Nested/BodiesNest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ----------------------------------------------------------------------------------------------------------------------
# - Package Imports -
# ----------------------------------------------------------------------------------------------------------------------
# General Packages
from __future__ import annotations

# Custom Library

# Custom Packages
from AthenaColor.Console.Styling.Nested.RgbControlledNest import RgbControlledNested
from AthenaColor.Console.Styling.Inline.Bodies import Fore, Back, Underline
from AthenaColor.Console.Styling.Inline.Style import Style

# ----------------------------------------------------------------------------------------------------------------------
# - All -
# ----------------------------------------------------------------------------------------------------------------------
__all__=[
"ForeNest","BackNest", "UnderlineNest"
]

# ----------------------------------------------------------------------------------------------------------------------
# - Code -
# ----------------------------------------------------------------------------------------------------------------------
ForeNest = RgbControlledNested(
inline_class=Fore,
reset=Style.NoForeground
)

BackNest = RgbControlledNested(
inline_class=Back,
reset=Style.NoBackground
)

UnderlineNest = RgbControlledNested(
inline_class=Underline,
reset=Style.NoUnderline
)
Loading