MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / jsonFromColor

Function jsonFromColor

source/core/StarJsonExtra.cpp:232–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232Json jsonFromColor(Color const& color) {
233 JsonArray result;
234 result.push_back(color.red());
235 result.push_back(color.green());
236 result.push_back(color.blue());
237 if (color.alpha() < 255)
238 result.push_back(color.alpha());
239 return result;
240}
241
242PolyD jsonToPolyD(Json const& v) {
243 PolyD poly;

Callers 7

toJsonMethod · 0.85
toJsonMethod · 0.85
storeMethod · 0.85
toJsonMethod · 0.85
toJsonMethod · 0.85
toJsonMethod · 0.85
entityNametagMethod · 0.85

Calls 5

redMethod · 0.80
greenMethod · 0.80
blueMethod · 0.80
push_backMethod · 0.45
alphaMethod · 0.45

Tested by

no test coverage detected