diff --git a/docs/components/color-picker.md b/docs/components/color-picker.md
index ea63ec01a..160b0629f 100644
--- a/docs/components/color-picker.md
+++ b/docs/components/color-picker.md
@@ -18,6 +18,14 @@ const App = () => ;
## Examples
+### Initial Value
+
+Use the `value` attribute to set an initial value for the color picker.
+
+```html preview
+
+```
+
### Opacity
Use the `opacity` attribute to enable the opacity slider. When this is enabled, the value will be displayed as HEXA, RGBA, or HSLA based on `format`.
diff --git a/docs/resources/changelog.md b/docs/resources/changelog.md
index b36540826..1bb36c3a0 100644
--- a/docs/resources/changelog.md
+++ b/docs/resources/changelog.md
@@ -10,6 +10,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis
- Fixed a bug that prevented form submission from working as expected in some cases
- Fixed a bug that prevented `` from toggling `vertical` properly [#703](https://github.com/shoelace-style/shoelace/issues/703)
+- Fixed a bug that prevented `` from rendering a color initially [#704](https://github.com/shoelace-style/shoelace/issues/704)
- Upgraded the status of `` from experimental to stable
## 2.0.0-beta.71
diff --git a/src/components/color-picker/color-picker.test.ts b/src/components/color-picker/color-picker.test.ts
index e57769099..680c74436 100644
--- a/src/components/color-picker/color-picker.test.ts
+++ b/src/components/color-picker/color-picker.test.ts
@@ -38,4 +38,11 @@ describe('', () => {
expect(opacitySlider).to.exist;
});
+
+ it('should display a color when an initial value is provided', async () => {
+ const el = await fixture(html` `);
+ const trigger = el.shadowRoot!.querySelector('[part="trigger"]');
+
+ expect(trigger?.style.color).to.equal('rgb(0, 0, 0)');
+ });
});
diff --git a/src/components/color-picker/color-picker.ts b/src/components/color-picker/color-picker.ts
index ad36f14d0..c2ee70ba4 100644
--- a/src/components/color-picker/color-picker.ts
+++ b/src/components/color-picker/color-picker.ts
@@ -164,7 +164,9 @@ export default class SlColorPicker extends LitElement {
/** The locale to render the component in. */
@property() lang: string;
- firstUpdated() {
+ connectedCallback() {
+ super.connectedCallback();
+
if (!this.setColor(this.value)) {
this.setColor(`#ffff`);
}