Remove the deprecated fehler module from color; adjust gray values

(from dev 3b91484c1049)
This commit is contained in:
ack committed 2026-07-31 19:45:31 +02:00
1 parent 55e1a1f3ac
commit 55a99c7eeb
3 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -4,11 +4,11 @@ import kutil
class Color(klammer_base.Klammer_base):
def __init__(self, K):
kutil.msg()
# kutil.msg()
super().__init__(K)
match = re.compile(r'([0-9.]+)\s*,\s*([0-9.]+)\s*,\s*([0-9.]+)', re.S).match(self.rgb)
if not match:
raise fehler.KlammertextError(
raise Exception(
'Error in color format: "{}". '.format(K.rgb)
+ 'Should be "<r>,<g>,<b>", where the components are [0,1].')
self.r, self.g, self.b = [float(c) for c in match.groups()]