MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / fromIosColor

Method fromIosColor

packages/core/color/index.ios.ts:16–23  ·  view source on GitHub ↗
(value: UIColor)

Source from the content-addressed store, hash-verified

14 }
15
16 public static fromIosColor(value: UIColor): Color {
17 const r = new interop.Reference<number>();
18 const g = new interop.Reference<number>();
19 const b = new interop.Reference<number>();
20 const a = new interop.Reference<number>();
21 value.getRedGreenBlueAlpha(r, g, b, a);
22 return new Color(Math.round(a.value * 255), Math.round(r.value * 255), Math.round(g.value * 255), Math.round(b.value * 255));
23 }
24}

Callers 1

testFromIosColorWhiteFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected