Shuffleboard Custom Widget Data

I am currently working on transferring shuffleboard from a .Json file to java and I am wondering how to make a custom color on a boolean.

"content": {
              "_type": "Boolean Box",
              "_title": "stuff",
              "Colors/Color when true": "#7CFC00FF",
              "Colors/Color when false": "#0000FF"
intakeBooleanBallIn = _addWidgetToTab(shuffleIntakeTab, "BallColour", true, BuiltInWidgets.kBooleanBox, 2, 2, 4, 2,
            Map.of("Colors/Color when true", "#0000ff", "Colors/Color when false", "#7CFC00FF"));
    private NetworkTableEntry _addWidgetToTab(ShuffleboardTab tab, String name, Object defaulValue, BuiltInWidgets Widget, int sizeX, int sizeY,
        int posX, int posY, Map<String, Object> props) {
        return tab.add(name, defaulValue).withWidget(Widget).withPosition(posX, posY).withSize(sizeX, sizeY).withProperties(props).getEntry();

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.