package com.pixelized.desktop.lwa.utils

import androidx.compose.material.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import com.pixelized.desktop.lwa.ui.theme.lwa

@Composable
@ReadOnlyComposable
fun rememberBackgroundGradient(
    color: Color = MaterialTheme.lwa.colorScheme.base.surface,
    from: Float = 0.5f,
    to: Float = 1.0f,
): Brush {
    return Brush.verticalGradient(
        colors = listOf(
            color.copy(alpha = from),
            color.copy(alpha = to),
        )
    )
}