import {Color,Brush}from'@scandit/web-datacapture-core';function e(o){return Color.fromRGBA(o.r*255,o.g*255,o.b*255,o.a*255)}function s(o){return {r:o.red/255,g:o.green/255,b:o.blue/255,a:o.alpha/255}}function u(o){return Brush.fromJSONObject({fill:{color:e(o.fillColor).toJSON()},stroke:{color:e(o.strokeColor).toJSON(),width:o.strokeWidth}})}function a(o){let r=o instanceof Brush?o:Brush.fromJSONObject(o);return {fillColor:s(r.fillColor),strokeColor:s(r.strokeColor),strokeWidth:r.strokeWidth}}export{e as a,s as b,u as c,a as d};