colors.py 905 B

1234567891011121314151617181920212223242526272829
  1. from .. import vue
  2. from ..element import Element
  3. vue.register_component('colors', __file__, 'colors.js')
  4. class Colors(Element):
  5. def __init__(self, *,
  6. primary='#5A99FF',
  7. secondary='#26a69a',
  8. accent='#9c27b0',
  9. positive='#21ba45',
  10. negative='#c10015',
  11. info='#31ccec',
  12. warning='#f2c037') -> None:
  13. """Color Theming
  14. Sets the main colors (primary, secondary, accent, ...) used by `Quasar <https://quasar.dev/>`_.
  15. """
  16. super().__init__('colors')
  17. self._props['primary'] = primary
  18. self._props['secondary'] = secondary
  19. self._props['accent'] = accent
  20. self._props['positive'] = positive
  21. self._props['negative'] = negative
  22. self._props['info'] = info
  23. self._props['warning'] = warning
  24. self.update()