MCPcopy Create free account
hub / github.com/Card-Forge/forge / borderLining

Method borderLining

forge-gui-mobile/src/forge/Graphics.java:1567–1575  ·  view source on GitHub ↗
(String c)

Source from the content-addressed store, hash-verified

1565 }
1566
1567 public Color borderLining(String c) {
1568 if (c == null || "".equals(c))
1569 return Color.valueOf("#fffffd");
1570 int c_r = Integer.parseInt(c.substring(0, 2), 16);
1571 int c_g = Integer.parseInt(c.substring(2, 4), 16);
1572 int c_b = Integer.parseInt(c.substring(4, 6), 16);
1573 int brightness = ((c_r * 299) + (c_g * 587) + (c_b * 114)) / 1000;
1574 return brightness > 155 ? Color.valueOf("#171717") : Color.valueOf("#fffffd");
1575 }
1576
1577 public Texture getDummyTexture() {
1578 if (dummyTexture == null) {

Callers 1

drawBorderImageMethod · 0.95

Calls 2

equalsMethod · 0.45
valueOfMethod · 0.45

Tested by

no test coverage detected