Edit in JSFiddle

CSS.registerProperty({
    name: '--my-color',
    syntax: '<color>',
    initialValue: 'green',
    inherits: 'false',
  });