// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package designcompose.definition.element;

option java_multiple_files = true;
option java_package = "com.android.designcompose.definition.element";
option optimize_for = LITE_RUNTIME;

// Color represents a color value within a design, encoded as RGBA (Red, Green,
// Blue, Alpha) where each component is an 8-bit integer. Alpha determines
// opacity, with 255 being fully opaque and 0 fully transparent.
// Encoding each component to uint32, which uses variable-length encoding.
message Color {
  uint32 r = 1;
  uint32 g = 2;
  uint32 b = 3;
  uint32 a = 4;
}

// Color represented using floats in the range of 0 to 1.
message FloatColor {
  float r = 1;
  float g = 2;
  float b = 3;
  float a = 4;
}
