Color suggestions now match json format for easy copy-paste

This commit is contained in:
Yair Morgenstern
2023-01-12 15:19:44 +02:00
parent 54a192558f
commit 9eda2d2564
2 changed files with 4 additions and 3 deletions

View File

@ -96,8 +96,9 @@ class RulesetValidator(val ruleset: Ruleset) {
val newOuterColor = nation.getOuterColor().cpy().lerp(outerLerpColor, 0.05f *i)
if (getContrastRatio(newInnerColor, newOuterColor) > 3){
text += "\n Suggested inner color: (${(newInnerColor.r*255).toInt()}, ${(newInnerColor.g*255).toInt()}, ${(newInnerColor.b*255).toInt()})"
text += "\n Suggested outer color: (${(newOuterColor.r*255).toInt()}, ${(newOuterColor.g*255).toInt()}, ${(newOuterColor.b*255).toInt()})"
text += "\nSuggested colors: "
text += "\n\t\t\"outerColor\": [${(newOuterColor.r*255).toInt()}, ${(newOuterColor.g*255).toInt()}, ${(newOuterColor.b*255).toInt()}],"
text += "\n\t\t\"innerColor\": [${(newInnerColor.r*255).toInt()}, ${(newInnerColor.g*255).toInt()}, ${(newInnerColor.b*255).toInt()}],"
break
}
}

View File

@ -135,7 +135,7 @@ class ModCheckTab(
val label = Label(line.text, BaseScreen.skin)
.apply { color = line.errorSeverityToReport.color }
label.wrap = true
it.add(label).width(stage.width / 2).row()
it.add(label).width(stage.width / 2).pad(10f).row()
}
if (!noProblem)
it.add("Copy to clipboard".toTextButton().onClick {