0

I would like to be able to adjust the transparency of the Earth Engine ui.Panel element. The documentation for panel style has no apparent option to set opacity/transparency; is there any way to do this?

Here is a panel example:

var panel = ui.Panel({
  style: {
    height: '235px',
    width: '600px',
    position: 'bottom-right',
  }
});

Map.add(panel);

1 Answer 1

4

You can use the CSS rgba(red, green, blue, alpha) function as a value for the backgroundColor style property (can be applied to ui.Label as well):

var panel = ui.Panel({
  style: {
    height: '235px',
    width: '600px',
    position: 'bottom-right',
    backgroundColor: 'rgba(255, 255, 255, 0.5)',
  }
});

Map.add(panel);

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.