diff --git a/src/main/java/dan200/computercraft/core/terminal/Terminal.java b/src/main/java/dan200/computercraft/core/terminal/Terminal.java index f6e647bb3..91d6ffe2b 100644 --- a/src/main/java/dan200/computercraft/core/terminal/Terminal.java +++ b/src/main/java/dan200/computercraft/core/terminal/Terminal.java @@ -419,6 +419,7 @@ public class Terminal { if( c >= '0' && c <= '9' ) return c - '0'; if( c >= 'a' && c <= 'f' ) return c - 'a' + 10; + if( c >= 'A' && c <= 'F' ) return c - 'A' + 10; return 15 - def.ordinal(); } } diff --git a/src/main/resources/data/computercraft/lua/rom/apis/window.lua b/src/main/resources/data/computercraft/lua/rom/apis/window.lua index feafa00c2..724cda155 100644 --- a/src/main/resources/data/computercraft/lua/rom/apis/window.lua +++ b/src/main/resources/data/computercraft/lua/rom/apis/window.lua @@ -265,6 +265,8 @@ function create(parent, nX, nY, nWidth, nHeight, bStartVisible) if #sTextColor ~= #sText or #sBackgroundColor ~= #sText then error("Arguments must be the same length", 2) end + sTextColor = sTextColor:lower() + sBackgroundColor = sBackgroundColor:lower() internalBlit(sText, sTextColor, sBackgroundColor) end